<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>商品列表</title>
	<meta name="description" content="Static & Dynamic Tables" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<!-- basic styles -->
	<hdjs/>
	<link href="__PUBLIC__/css/common.css" rel="stylesheet" />
	<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet" />
	<link href="__PUBLIC__/css/bootstrap-responsive.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__PUBLIC__/css/font-awesome.min.css" />
	<!--[if IE 7]>
	  <link rel="stylesheet" href="__PUBLIC__/css/font-awesome-ie7.min.css" />
	<![endif]-->
	<!-- page specific plugin styles -->
	
	<!-- ace styles -->
	<link rel="stylesheet" href="__PUBLIC__/css/ace.min.css" />
	<link rel="stylesheet" href="__PUBLIC__/css/ace-responsive.min.css" />
	<link rel="stylesheet" href="__PUBLIC__/css/ace-skins.min.css" />
	<!--[if lt IE 9]>
	  <link rel="stylesheet" href="__PUBLIC__/css/ace-ie.min.css" />
	<![endif]-->
</head>
<body>

	<div class="container-fluid" id="main-container">
		<a href="#" id="menu-toggler"><span></span></a><!-- menu toggler -->
		<div class="table-header">
			商品管理 | <a style="font-size:14px;" href="{|U:'Goods/index'}">商品列表</a>
		</div>
		<!-- PAGE CONTENT BEGINS HERE -->
		<div class="row-fluid">
			<div class="span12">
				<table id="table_bug_report" class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							<th class="center">
								<label><input type="checkbox" /><span class="lbl"></span></label>
							</th>
							<th>GID</th>
							<th>商品名称</th>
							<th>商品价格</th>
							<th>促销价格</th>
							<th>是否上架</th>
							<th>发布时间</th>
							<th>上架时间</th>
							<th>点击数</th>
							<th>所属分类</th>
							<th>所属栏目</th>
							<th>首页推荐</th>
							<th>推荐排序</th>
							<th>库存数量</th>
							<th>发布人</th>
							<th>操作</th>
						</tr>
					</thead>
											
					<tbody>
					<foreach from="$goods" value="$value">
						<tr>
							<td class='center'>
								<label><input type='checkbox' /><span class="lbl"></span></label>
							</td>
							<td>{$value.gid}</td>
							<td class="goodsname" style="width:330px;min-height:40px;">{$value.gname}
								<img src="__ROOT__/{$value.gthumb_img}">
							</td>
							<style type="text/css">
								.goodsname{
									position: relative;
									cursor: default;
									display: inline-block;
								}
								.goodsname img{
									position: absolute;
									left: 0px;
									top:-50px;
									z-index: 1;
									display: none;
									border: 1px solid #DDDDDD;
									border-radius: 5px;
									box-shadow: 0 5px 15px rgba(0,0,0,0.1);
									width: 100px;
									height: 100px;
								}
							</style>
							<script type="text/javascript">
								$('.goodsname').hover(function() {
									$(this).find('img').show();
								}, function() {
									$(this).find('img').hide();
								});
							</script>
							<td>{$value.gprice}</td>
							<td>{$value.gpmt_price}</td>
							<td><if value="$value['gis_shelves']==1"><a href="">是</a><else/><a href="">否</a></if></td>
							<td>{$value.gadd_time|hd_date}</td>
							<td>{$value.gshelf_time}</td>
							<td>{$value.gclick}</td>
							<td>{$value.qm_category_cid}</td>
							<td>{$value.qm_channel_nid}</td>
							<td>{$value.gattr}</td>
							<td>{$value.gsort}</td>
							<td>{$value.ginventory}</td>
							<td>{$value.qm_admin_qid}</td>
							<td>
								<div class="inline position-relative">
									<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown"><i class="icon-cog icon-only"></i></button>
									<ul class="dropdown-menu dropdown-icon-only dropdown-light pull-right dropdown-caret dropdown-close">
										<li><a href="{|U:'Goods/combine',array('gid'=>$value['gid'],'tid'=>$value['qm_type_tid'])}" class="tooltip-warning" data-rel="tooltip" title="货品列表" data-placement="left"><span class="blue"><i class="icon-flag"></i></span> </a></li>
										<li><a href="{|U:'Goods/edit_goods',array('gid'=>$value['gid'])}" class="tooltip-success" data-rel="tooltip" title="编辑" data-placement="left"><span class="green"><i class="icon-edit"></i></span></a></li>
										<li><a href="{|U:'Goods/del_goods',array('gid'=>$value['gid'])}" class="tooltip-error" data-rel="tooltip" title="删除" onclick="if(!confirm('确定要删除吗？本系统没有回收站,删除后就无法恢复了.')) return false"><span class="red"><i class="icon-trash"></i></span> </a></li>
									</ul>
								</div>
							</td>
						</tr>
					</foreach>
					</tbody>
				</table>
			</div><!--/span-->
		</div><!--/row-->
		
		<!-- PAGE CONTENT ENDS HERE -->
				  


	</div><!-- #main-content -->
	

	<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse">
		<i class="icon-double-angle-up icon-only"></i>
	</a>
	<!-- basic scripts -->
	<script type="text/javascript"></script>
	<script src="__PUBLIC__/js/bootstrap.min.js"></script>
	<!-- page specific plugin scripts -->
	
	<script type="text/javascript" src="__PUBLIC__/js/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/jquery.dataTables.bootstrap.js"></script>
	<!-- ace scripts -->
	<script src="__PUBLIC__/js/ace-elements.min.js"></script>
	<script src="__PUBLIC__/js/ace.min.js"></script>
	<!-- inline scripts related to this page -->
	
	<script type="text/javascript">
	$(function() {
		var oTable1 = $('#table_report').dataTable( {
		"aoColumns": [
	      { "bSortable": false },
	      null, null,null, null, null,
		  { "bSortable": false }
		] } );


		$('table th input:checkbox').on('click' , function(){
			var that = this;
			$(this).closest('table').find('tr > td:first-child input:checkbox')
			.each(function(){
				this.checked = that.checked;
				$(this).closest('tr').toggleClass('selected');
			});
				
		});
		$('[data-rel=tooltip]').tooltip();
		})
	</script>
</body>
</html>